<template>
	<view>
		<uni-popup type="bottom" ref="openSetting" :maskClick="false">
			<view class="openSetting">
				<view class="templeteMessage-box-close"><u-icon name="close" size="40" @click="closeOpenSetting"></u-icon></view>
				<view class="openSetting-tit">{{tips}}</view>
				<view class="openSetting-btn"><button open-type="openSetting">立即打开设置</button></view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		props: {
			tips: {
				type: String,
				default: '您已关闭消息通知主开关，请打开开关后重新点击'
			}
		},
		data() {
			return {
				
			};
		},
		methods: {
			init(){
				this.$refs.openSetting.open()
			},
			closeOpenSetting(){
				this.$refs.openSetting.close()
				this.$emit('closeOpenSetting')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.openSetting{
		background-color: #FFF;
		border-radius: 10rpx 10rpx 0 0;
		padding: 30rpx;
		.templeteMessage-box-close{
			text-align: right;
		}
		.openSetting-tit{
			margin: 30rpx 0;
			font-size: 30rpx;
			line-height: 40rpx;
			color: #666;
		}
		.openSetting-btn{
			button{
				color: #FFF;
				background-color: #141414;
				font-size: 30rpx;
				height: 90rpx;
				line-height: 90rpx;
				&::after{
					display: none;
				}
			}
		}
	}
</style>